package com.infra.micro.id.fallback;

import com.infra.common.resp.Response;
import com.infra.micro.id.api.IdHealthApi;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class IdHealthApiFallback implements FallbackFactory<IdHealthApi> {
    @Override
    public IdHealthApi create(Throwable cause) {
        return () -> Response.error("服务器错误，请联系相关服务负责人");
    }
}
